package com.coffee.admin.api.platform.result;

import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class PlatformPermissionResultqaa implements Serializable {
    private static final long serialVersionUID = -1L;
    private Integer id;
    private String name;
    private Integer pid;
    private String pidPath;


    private List<PlatformPermissionResultqaa> childList = new ArrayList<PlatformPermissionResultqaa>();

    public static void main(String[] args) {
        PlatformPermissionResultqaa a = new PlatformPermissionResultqaa();
        a.setId(0);
        a.setName("一级类目");
        a.setPid(0);
        a.setPidPath("路径");
        List<PlatformPermissionResultqaa> childList = new ArrayList<>();
        PlatformPermissionResultqaa b = new PlatformPermissionResultqaa();
        b.setId(0);
        b.setName("二级级类目");
        b.setPid(0);
        b.setPidPath("路径");
        List<PlatformPermissionResultqaa> cchildList = new ArrayList<>();
        PlatformPermissionResultqaa c = new PlatformPermissionResultqaa();
        c.setId(0);
        c.setName("三级级级类目");
        c.setPid(0);
        c.setPidPath("路径");
        cchildList.add(c);
        b.setChildList(cchildList);
        childList.add(b);
        a.setChildList(childList);
        System.out.println(JSONObject.toJSONString(a));


    }
}

